# AccessibleForms
require 'hinted_form'

module BrianTheCoder
  module Plugins
    module AccessibleForms
      def accessible_form_for(name, *args, &block)
        options = args.last.is_a?(Hash) ? args.pop : {}
    		options = options.merge(:builder => HintedForm)
    		args = (args << options)
    		form_for(name, *args, &block)
      end
      
      def accessible_fields_for(name, *args, &block)
        options = args.last.is_a?(Hash) ? args.pop : {}
    		options = options.merge(:builder => HintedForm)
    		args = (args << options)
    		fields_for(name, *args, &block)
      end
    end
  end
end